package cc.grapevine.vps.http;

public class URLManager
{
	public static final String LOGIN = "http://www.self2host.com/api/login.php";

	public static final String LIST_URL = "http://www.self2host.com/api/listvms.php";

	public static final String DETECT_STATUS = "http://www.self2host.com/api/vmstatuscode.php";

	private static final String MANAGET_VPS = "http://www.self2host.com/api/vmaction.php";

	public static String createDecStatus(String id, String name)
	{
		return DETECT_STATUS + "?nodeid=" + id + "&vmname=" + name;
	}

	public static String createShutDownVps(String id, String name)
	{
		return createManagerUrl("shutdown", id, name);
	}

	public static String createStartVps(String id, String name)
	{
		return createManagerUrl("start", id, name);
	}

	public static String createRestartVps(String id, String name)
	{
		return createManagerUrl("reboot", id, name);
	}

	public static String createPowerOffVps(String id, String name)
	{
		return createManagerUrl("poweroff", id, name);
	}

	private static String createManagerUrl(String action, String id, String name)
	{
		return MANAGET_VPS + "?action=" + action + "&nodeid=" + id + "&vmname=" + name;
	}

}